//
//  DnSuperImageView.h
//  DnImageCropper
//
//  Created by Ngoc on 09/12/2011.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "NYOBetterZoomUIScrollView.h"
#import "ResizableView.h"
#import "UIImageUtils.h"
#import "DnSuperImageViewEnum.h"

#import "IFSimpleTintFilter.h"
#import "IFGreyscaleFilter.h"
#import "IFPixelationFilter.h"
#import "IFBrightnessFilter.h"
#import "IFThermalFilter.h"
#import "IFSnowFuzzFilter.h"
#import "IFSaturationFilter.h"
#import "IFHueFilter.h"
#import "IFBlurFilter.h"
#import "IFFindEdgesFilter.h"
#import "IFEmbossFilter.h"
#import "IFSharpenFilter.h"
#import "IFTiltShiftFilter.h"

@interface DnSuperImageView : UIView <UIScrollViewDelegate, ResizableViewDelegate,IFFilterDelegate>{
    NYOBetterZoomUIScrollView *_scrollView;
    UIImageView *_imageView;
    ResizableView *_cropAreaSelectionView;
    ResizeMethod _resizeStrategy;
    UIView *overlapView;

    NSArray *_rollBackImages;
    float _maximumZoomScale;
    Action _currentAction;
    CGFloat _rotation;
    float _lastScrollViewZoomScale;
    CGRect _lastImageViewFrame;
    
    FilterAlgorithm _filter;
    float _minimumSliderValue, _maximumSilderValue,_currentSliderValue;
    
    UIImage *_originalImage;
    NSMutableArray *_redoArrayImage, *_undoArrayImage;
    BOOL _isCanSlide;
    CGPoint _lastTouchPosition;
    UIActivityIndicatorView *_activityView;
}
@property(nonatomic, assign) ResizeMethod resizeStrategy;
@property(nonatomic, assign) FilterAlgorithm fliter;
@property(nonatomic, readonly) float currentSliderValue;
@property(nonatomic, retain) UIImage *image;
- (id)initWithFrame:(CGRect)frame image:(UIImage*) image;
-(void) startAction: (Action) action;
-(void) cancelCurrentAction;
-(void) finishCurrentAction;
-(void) flipImage:(FlipDirection) direction;
-(BOOL) isCanRedo;
-(BOOL) isCanUndo;
-(void) applyEffect:(FilterAlgorithm) effect;
-(void) redo;
-(void) undo;
-(void) borderWithStyle:(DnBorderStyle) borderStyle;
@end

